package com.java.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
/**
 * 工厂付款情况
 * @author Administrator
 *
 */
@Entity
@org.hibernate.annotations.Entity(
		selectBeforeUpdate = true, 
		dynamicInsert = true, 
		dynamicUpdate = true
)
@Table(name="factory_payment")
public class FactoryPayment implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1673966618709472220L;

	@Id
	@GeneratedValue
	private Long id;
	
	/**
	 * 所属订单
	 */
	@ManyToOne
	@NotFound(action=NotFoundAction.IGNORE)
	private OrderForm order;
	
	/**
	 * 合作工厂
	 */
	@Column(length=200)
	private String cooperFactory;
	
	/**
	 * 总金额
	 */
	@Column(nullable=true)
	private Double amount=0d;
	
	/**
	 * 价格条款
	 */
	@Column(length=200)
	private String terms;
	
	/**
	 * 第1次付款
	 */
	@Column(nullable=true)
	private Double payment1=0d;
	
	/**
	 * 第1次付款时间
	 */
	@Temporal(TemporalType.TIMESTAMP)	
	private Date paymentDate1;
	
	/**
	 * 第1次付款
	 */
	@Column(nullable=true)
	private Double payment2=0d;
	
	/**
	 * 第1次付款时间
	 */
	@Temporal(TemporalType.TIMESTAMP)	
	private Date paymentDate2;
	
	/**
	 * 第1次付款
	 */
	@Column(nullable=true)
	private Double payment3=0d;
	
	/**
	 * 第1次付款时间
	 */
	@Temporal(TemporalType.TIMESTAMP)	
	private Date paymentDate3;
	
	/**
	 * 退税收入
	 */
	@Column(nullable=true)
	private Double taxRevenue=0d;
	
	/**
	 * 备注
	 */
	@Column(length=200)
	private String detail;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public OrderForm getOrder() {
		return order;
	}

	public void setOrder(OrderForm order) {
		this.order = order;
	}

	public String getCooperFactory() {
		return cooperFactory;
	}

	public void setCooperFactory(String cooperFactory) {
		this.cooperFactory = cooperFactory;
	}

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public String getTerms() {
		return terms;
	}

	public void setTerms(String terms) {
		this.terms = terms;
	}

	public Double getPayment1() {
		return payment1;
	}

	public void setPayment1(Double payment1) {
		this.payment1 = payment1;
	}

	public Date getPaymentDate1() {
		return paymentDate1;
	}

	public void setPaymentDate1(Date paymentDate1) {
		this.paymentDate1 = paymentDate1;
	}

	public Double getPayment2() {
		return payment2;
	}

	public void setPayment2(Double payment2) {
		this.payment2 = payment2;
	}

	public Date getPaymentDate2() {
		return paymentDate2;
	}

	public void setPaymentDate2(Date paymentDate2) {
		this.paymentDate2 = paymentDate2;
	}

	public Double getPayment3() {
		return payment3;
	}

	public void setPayment3(Double payment3) {
		this.payment3 = payment3;
	}

	public Date getPaymentDate3() {
		return paymentDate3;
	}

	public void setPaymentDate3(Date paymentDate3) {
		this.paymentDate3 = paymentDate3;
	}

	public Double getTaxRevenue() {
		return taxRevenue;
	}

	public void setTaxRevenue(Double taxRevenue) {
		this.taxRevenue = taxRevenue;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}


	
}
